import 'package:xinxuan/vo/common_vo/common_pagination_vo.dart';

class ActivitySubsidiesVo {

  List<ActivitySubsidiesItem>? data;
  ActivitySubsidiesMeta? meta;

  ActivitySubsidiesVo({this.data, this.meta});

  ActivitySubsidiesVo.fromJson(Map<String, dynamic> json) {
    if (json['data'] != null) {
      data = <ActivitySubsidiesItem>[];
      json['data'].forEach((v) {
        data!.add(new ActivitySubsidiesItem.fromJson(v));
      });
    }
    meta = json['meta'] != null ? new ActivitySubsidiesMeta.fromJson(json['meta']) : null;
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    if (this.data != null) {
      data['data'] = this.data!.map((v) => v.toJson()).toList();
    }
    if (this.meta != null) {
      data['meta'] = this.meta!.toJson();
    }
    return data;
  }
}

class ActivitySubsidiesItem {
  String? username;
  String? createdAt;
  String? subsidy;

  ActivitySubsidiesItem({this.username, this.createdAt, this.subsidy});

  ActivitySubsidiesItem.fromJson(Map<String, dynamic> json) {
    username = json['username'];
    createdAt = json['created_at'];
    subsidy = json['subsidy'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['username'] = this.username;
    data['created_at'] = this.createdAt;
    data['subsidy'] = this.subsidy;
    return data;
  }
}

class ActivitySubsidiesMeta {
  String? totalSubsidy;
  CommonPagination? pagination;

  ActivitySubsidiesMeta({this.totalSubsidy, this.pagination});

  ActivitySubsidiesMeta.fromJson(Map<String, dynamic> json) {
    totalSubsidy = json['total_subsidy'];
    pagination = json['pagination'] != null
        ? new CommonPagination.fromJson(json['pagination'])
        : null;
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['total_subsidy'] = this.totalSubsidy;
    if (this.pagination != null) {
      data['pagination'] = this.pagination!.toJson();
    }
    return data;
  }
}
